
/*****  Step 1.0 Create database  *****/

USE [master]
GO
IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = N'HKUST_Inv_Sys')
BEGIN
CREATE DATABASE [HKUST_Inv_Sys] ON  PRIMARY 
( NAME = N'HKUST_Inv_Sys', FILENAME = N'c:\SQL\HKUST_Inv_Sys.mdf' , SIZE = 4096KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'HKUST_Inv_Sys_log', FILENAME = N'c:\SQL\HKUST_Inv_Sys_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
END

GO
EXEC dbo.sp_dbcmptlevel @dbname=N'HKUST_Inv_Sys', @new_cmptlevel=90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [HKUST_Inv_Sys].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ARITHABORT OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET  DISABLE_BROKER 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET  READ_WRITE 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET RECOVERY SIMPLE 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET  MULTI_USER 
GO
ALTER DATABASE [HKUST_Inv_Sys] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [HKUST_Inv_Sys] SET DB_CHAINING OFF 

--=============== END ==============================
